package game;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;

import domain.Map;

public class PathFinder {
	
	
	public List<Integer> find(Map map,Integer honnan, Integer hova) {

		List<Elem> list = new ArrayList<Elem>();
		List<Integer> templist = new ArrayList<Integer>();
		list.add(new Elem(honnan,null));
		Elem aktelem = new Elem(honnan,null);
		int i=0;
		boolean b=false;
		
		while (aktelem.azon!=hova || i<5){
			//templist = map.getNeighbours(aktelem.azon);
			for (Integer temp : templist){
				for (Elem akt : list){
					if (akt.azon==temp){
						b=true;
						break;
					}
				}
				if (!b){
				list.add(new Elem(i+1, aktelem));
				}
				b=false;
			}
			i++;
			aktelem=list.get(i);
		}
		
		for (Elem temp: list){
			System.out.println(temp.azon);
		}
		
		
		return null;
		
	}
	

	
}
